package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2025-03-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_file_import_record")
@NoArgsConstructor
public class FileImportRecordDo extends Model<FileImportRecordDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类型
     */
    @TableField("type")
    private String type;

    /**
     * 源文件id
     */
    @TableField("source_file_id")
    private Long sourceFileId;

    @TableField("source_file_url")
    private String sourceFileUrl;

    private Integer status;

    @TableField("error_file_url")
    private String errorFileUrl;

    /**
     * 错误信息文件id
     */
    @TableField("error_file_id")
    private Long errorFileId;

    @TableField("company_id")
    private Long companyId;

    @TableField("shop_id")
    private Long shopId;

    @TableField("success_count")
    private Integer successCount;

    @TableField("error_count")
    private Integer errorCount;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    public FileImportRecordDo(String type, Long sourceFileId, Long errorFileId, Long companyId, Long shopId, Integer successCount, Integer errorCount, Date createTime, Long createBy) {
        this.type = type;
        this.sourceFileId = sourceFileId;
        this.errorFileId = errorFileId;
        this.companyId = companyId;
        this.shopId = shopId;
        this.successCount = successCount;
        this.errorCount = errorCount;
        this.createTime = createTime;
        this.createBy = createBy;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
